import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
    { path: '/forget', 
      name: 'ForgetPassword', 
      component: () => import('../views/ForgetPasswordView.vue'),
    },
    { path: '/register', 
      name: 'register', 
      component: () => import('../views/RegisterView.vue'),
    },
    {
      path: '/history',

      name: 'history',
      component: () => import('../views/HistoryView.vue'),
    },
    { path: '/site', 
      name: 'site',
      component: () => import('../views/SiteView.vue'),
    },
    { path: '/food', 
      name: 'food', 
      component: () => import('../views/FoodView.vue'),
    },
     { path: '/message', 
      name: 'message',
      component: () => import('../views/PostView.vue'),
    },
      { path: '/post', 
      name: 'postDetail', 
      component: () => import('../views/PostDetailView.vue'),
    },
    // { path: '/ai', 
    //   name: 'ai', 
    //   component: () => import('../views/AiView.vue'),
    // },
    {
      path: '/user-info',
      name: 'UserInfo',
      component: () => import('../views/UserInfo.vue')
    },
    {
      path: '/my-orders',
      name: 'MyOrders',
      component: () => import('../views/MyOrdersView.vue')
    },
    {
      path: '/pay',
      name: 'Pay',
      component: () => import('../views/PayView.vue')
    },
    {
      path: '/test-user-info',
      name: 'TestUserInfo',
      component: () => import('../views/TestUserAPI.vue')
    }
  ],
})

export default router
